# frozen_string_literal: true

class CreateSchemas < ActiveRecord::Migration[6.0]
  def change
    create_table :schemas do |t|
      t.string  :uuid,        null: false,  limit: 64
      t.string  :name,        null: false,  limit: 255
      t.string  :description, null: false,  limit: 255
      t.string  :status,      null: false,  limit: 32
      t.timestamps            null: false
    end

    add_index :schemas, :uuid, unique: true
    add_index :schemas, :name
  end
end
